package idv.arthur.svn;

import idv.arthur.widgets.CommitMediator;

import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNNodeKind;
import org.tmatesoft.svn.core.SVNURL;
import org.tmatesoft.svn.core.auth.ISVNAuthenticationManager;
import org.tmatesoft.svn.core.io.ISVNEditor;
import org.tmatesoft.svn.core.io.SVNRepository;
import org.tmatesoft.svn.core.io.SVNRepositoryFactory;
import org.tmatesoft.svn.core.wc.SVNWCUtil;

public class MkdirChain {

	public static void main(String[] args) throws SVNException {
		
		final String url = "http://10.144.97.99/blcmol01/";
		final String usr = "blcmol01";
		final String pwd = "abcd1234";
		
		final SVNRepository repo = SVNRepositoryFactory.create(SVNURL.parseURIEncoded(url));
		final ISVNAuthenticationManager authManager = SVNWCUtil.createDefaultAuthenticationManager(usr,pwd);
		repo.setAuthenticationManager(authManager);
		
		//String relativePath = "EncapObj/m2e-wtp/ear-resources/META-INF/maven/541/dps";
		String relativePath = "MOrderSource/EncapObj/m2e-wtp/ear-resources/META-INF/maven/541/dps";
		
		SVNNodeKind nodeKind = repo.checkPath(relativePath, -1);
		System.out.println(nodeKind);
		
		
		ISVNEditor editor = repo.getCommitEditor(null, new CommitMediator());
		System.out.println(nodeKind);
	}

}
